package com.yunhuajinfu.anim;

import android.animation.ObjectAnimator;
import android.util.DisplayMetrics;
import android.view.View;

/**
 * Created by ekikousei易皇星 on 16/11/24.
 * E-mail:13764664731@163.com
 * Signature:缘分是本书,翻的不经意会错过,读的太认真会流泪!!
 * <p>
 * TODO:类描述:
 */
public class BounceTopEnter extends BaseAnimatorSet {
    public BounceTopEnter() {
        duration = 1000;
    }
    @Override
    public void setAnimation(View view) {

        DisplayMetrics dm = view.getContext().getResources().getDisplayMetrics();
        animatorSet.playTogether(ObjectAnimator.ofFloat(view, "alpha", 0, 1, 1, 1),//
                ObjectAnimator.ofFloat(view, "translationY", -250 * dm.density, 30, -10, 0));

    }

}
